#include <iostream>

using namespace std;

//定义书的类
class Book
{
public:	
	Book()
	{
		
	}
	Book(string newname)
	{
		bookname=newname;
	}
private:
	string bookname;
};

//定义读者类
class Reader
{
public:
	void getBook(Book &newbook)
	{
		somebook=newbook;
	}
private:
	Book somebook;  //调用无参构造函数
};

int main()
{
	//定义一本书
	Book book("红楼梦");
	//定义一个读者
	Reader reader;
	reader.getBook(book);
}